﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="/static/css/table.css"
			type="text/css"></link>
		<script type="text/javascript"
			src="/static/javascript/comm/comm.js">
		</script>
		<!--以下3个js库必须按照顺序引入-->
		<!--vue脚本库-->
		<script type="text/javascript"
				src="/static/js/vue-3.2.4.global.js">
			<!--axios脚本库-->
		</script>
		<script type="text/javascript"
				src="/static/js/axios-0.18.0.min.js">
		</script>
		<!--我们自己封装的axios函数库 -->
		<script type="text/javascript"
				src="/static/js/axios-helper.js">
		</script>
	</head>
	<script type="text/javascript">

			function submission(){
				document.forms[0].submit();
			}

			function page(currentPage){
				document.getElementById("pid").value=currentPage;
				document.forms[0].submit();
			}
	</script>


	<body id="app">
		<form action="../customiz/customizAction!findSecondKind" method="post">
				<table width="100%">
					<tr>
						<td>
							<font color="black">您正在做的业务是：人力资源--客户化设置--人力资源档案管理设置--II级机构设置
							</font>
						</td>
					</tr>
					<tr>
						<td align="right">
							<input type="button" value="添加" class="BUTTON_STYLE1"
								onclick="window.location.href='second_kind_register.html'" />
						</td>
					</tr>
				</table>
				<table width="100%" border="1" cellpadding=0 cellspacing=1
					bordercolorlight=#848284 bordercolordark=#eeeeee
					class="TABLE_STYLE1">
					<tr>
						<td width="15%" class="TD_STYLE1" hidden="hidden">
							编号
						</td>
						<td width="15%" class="TD_STYLE1">
							I级机构名称
						</td>
						<td width="15%" class="TD_STYLE1">
							II级机构编号
						</td>
						<td width="15%" class="TD_STYLE1">
							II级机构名称
						</td>
						<td width="22%" class="TD_STYLE1">
							薪酬发放责任人编号
						</td>
						<td width="22%" class="TD_STYLE1">
							销售责任人编号
						</td>
						<td width="5%" class="TD_STYLE1">
							变更
						</td>
						<td width="5%" class="TD_STYLE1" >
							删除
						</td>
					</tr>

						<tr v-for="sec in configFileSecondKindList">
							<td class="TD_STYLE2" hidden="hidden">{{sec.fskid}}
							</td>
							<td class="TD_STYLE2">{{sec.firstKindName}}
							</td>
							<td class="TD_STYLE2">{{sec.secondKindId}}
							</td>
							<td class="TD_STYLE2">{{sec.secondKindName}}
							</td>
							<td class="TD_STYLE2">{{sec.secondSalaryId}}
							</td>
							<td class="TD_STYLE2">{{sec.secondSaleId}}
							</td>
							<td class="TD_STYLE2">
								<a href="javascript:void(0)" @click="change(sec.fskid)">变更</a>
							</td>
							<td class="TD_STYLE2">
								<a href="javascript:void(0)" @click="del(sec.fskid)">删除</a>
							</td>
						</tr>

				</table>
				<br><br>
			<th colspan="7" class="pager"></th>
			<p>
			</form>
	</body>
	<script type="module">
		Vue.createApp({
			data(){
				return{
					configFileSecondKindList:[]
				}
			},
			created(){
				 this.loadConfigFileSecondKindList();

			},
			methods:{
				//加载二级机构设置列表
				loadConfigFileSecondKindList(){
					requestGet("/configFileSecondKind/queryList").then((data)=>{
						console.info(data);
						this.configFileSecondKindList=data;
					})
				},
				//删除
				del(fskid){
					requestDelete("/configFileSecondKind/del",{
						fskid:fskid
					}).then((data)=>{
						if(data.statusCode==1){
							window.location.href="/templates/page/client/second_delete_success.html"
						}else{
							alert("删除失败");
						}
					})
				},
				//修改
				change(fskid){
					sessionStorage.setItem("fskid",fskid);
					window.location.href="/templates/page/client/second_kind_change.html"
				}
			}
		}).mount("#app");
	</script>
</html>

